home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
net
/
dnet_src.lha
/
dnet
/
amiga
/
lib
/
dstat.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-11-05
|
577b
|
35 lines
/*
* DStat.C
*/
#include "lib.h"
int
DStat(host, buffer, max)
char *host;
APTR buffer;
long max;
{
IOSTD ior;
char buf[sizeof(DNETPORTNAME)+32];
PORT *replyport = CreatePort(NULL, 0);
PORT *dnetport;
if (!host)
host = "0";
sprintf(buf, "%s%s", DNETPORTNAME, host);
if (dnetport = FindPort(buf)) {
ior.io_Command = DNCMD_INFO;
ior.io_Unit = 0;
ior.io_Offset = 0;
ior.io_Data = buffer;
ior.io_Message.mn_ReplyPort = replyport;
PutMsg(dnetport, (MSG *)&ior);
WaitMsg(&ior);
DeletePort(replyport);
}
return(dnetport != NULL);
}